package com.joker.orange.service;

import com.joker.orange.domain.BuyOrder;
import com.joker.orange.domain.ChapterBuy;
import com.joker.orange.domain.vo.BuyOrderVo;
import com.joker.orange.domain.bo.BuyOrderBo;
import com.joker.common.core.page.TableDataInfo;
import com.joker.common.core.domain.PageQuery;

import java.util.Collection;
import java.util.List;

/**
 * 购买订单Service接口
 *
 * @author Joker
 * @date 2024-07-08
 */
public interface IBuyOrderService {

    BuyOrder queryByProductId(Long productId, Long chapterId, String orderType);

    /**
     * 查询购买订单
     */
    BuyOrderVo queryById(Long id);

    /**
     * 查询购买订单列表
     */
    TableDataInfo<BuyOrderVo> queryPageList(BuyOrderBo bo, PageQuery pageQuery);

    /**
     * 查询购买订单列表
     */
    List<BuyOrderVo> queryList(BuyOrderBo bo);

    /**
     * 新增购买订单
     */
    Boolean insertByBo(BuyOrderBo bo);

    /**
     * 修改购买订单
     */
    Boolean updateByBo(BuyOrderBo bo);

    /**
     * 校验并批量删除购买订单信息
     */
    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);

    /**
     * 小说/漫画购买掌机记录
     */
    void insertChapterBuy(ChapterBuy chapterBuy);
}
